export default function getNextDay(format = 'YYYY-MM-DD') {
	const today = new Date();
	const nextDay = new Date(today);
	nextDay.setDate(today.getDate() + 1);

	const year = nextDay.getFullYear();
	let month = nextDay.getMonth() + 1;
	let day = nextDay.getDate();

	month = month < 10 ? '0' + month : month;
	day = day < 10 ? '0' + day : day;

	if (format === 'YYYY-MM-DD') {
		return `${year}-${month}-${day}`;
	} else if (format === 'DD/MM/YYYY') {
		return `${day}/${month}/${year}`;
	} else if (format === 'MM/DD/YYYY') {
		return `${month}/${day}/${year}`;
	} else {
		throw new Error('Unsupported date format');
	}
}

// // 调用函数
// console.log(getNextDayDate('YYYY-MM-DD')); // 输出：2025-04-09
// console.log(getNextDayDate('DD/MM/YYYY')); // 输出：09/04/2025
// console.log(getNextDayDate('MM/DD/YYYY')); // 输出：04/09/2025